# -*- encoding=utf8 -*-
__author__ = "ASUS"

from airtest.core.api import *

auto_setup(__file__)

#赠送友情
touch((930,500))
sleep(3)
touch((614,510))
sleep(3)
touch((629,462))
sleep(3)
touch((760,462))
sleep(3)
touch((848,67))
sleep(3)

#对话
touch((200,515))
sleep(3)
touch((33,104))
sleep(3)
touch((298,513))
sleep(3)
touch((116,335))
sleep(6)
touch((298,513))
sleep(3)
touch((178,335))
sleep(6)
touch((298,513))
sleep(3)
touch((249,335))
sleep(6)
touch((298,513))
sleep(3)
touch((311,335))
sleep(6)
touch((298,513))
sleep(3)
touch((379,335))
sleep(3)

touch((465,5))
sleep(3)




#体力
touch((784,10))
sleep(3)
touch((570,293))
sleep(3)

touch((350,7))
sleep(3)

touch((350,7))
sleep(3)



#通关学院试炼
touch((930,450))
sleep(3)

if exists(Template(r"tpl1652857785148.png", record_pos=(-0.167, 0.0), resolution=(960, 540))):
    touch(Template(r"tpl1652857785148.png", record_pos=(-0.167, 0.0), resolution=(960, 540)))
    sleep(3)
    
else:
    touch((83,280))
    sleep(3)


    
sleep(10)

touch((750,400))
sleep(3)

touch(Template(r"tpl1652857855370.png", record_pos=(-0.24, -0.049), resolution=(960, 540)))
sleep(3)

touch((827,107))

sleep(3)
touch(Template(r"tpl1652857898272.png", record_pos=(0.416, 0.174), resolution=(960, 540)))
sleep(3)

touch(Template(r"tpl1652857934883.png", record_pos=(0.002, 0.086), resolution=(960, 540)))
sleep(10)

touch(Template(r"tpl1652857963296.png", record_pos=(0.089, 0.103), resolution=(960, 540)))
sleep(3)

touch((900,50))
sleep(8)







#刷裂魂
touch((930,450))
sleep(3)


sleep(3)

if exists(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540))):
    touch(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540)))
    sleep(3)
    
else:
    touch((83,280))
    sleep(3)
    
if exists(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540))):
    touch(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540)))
    sleep(8)
    
else:
    touch((83,280))
    sleep(3)
    
    
    
if exists(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540))):
    touch(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540)))
    sleep(8)
    
else:
    touch((83,280))
    sleep(3)
    
if exists(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540))):
    touch(Template(r"tpl1652858169378.png", record_pos=(-0.332, -0.019), resolution=(960, 540)))
    sleep(8)
    
else:
    touch((83,280))
    sleep(3)
touch((750,400))
sleep(6)

wait(Template(r"tpl1652858355581.png", record_pos=(0.411, 0.136), resolution=(960, 540)))
sleep(5)

touch((850,400))
sleep(3)
touch((559,281))
sleep(3)
touch((376,276))
sleep(3)
touch((479,354))
sleep(3)



sleep(20)
wait(Template(r"tpl1652858513671.png", record_pos=(0.023, -0.212), resolution=(960, 540)),timeout=400)
sleep(6)

touch((500,460))
sleep(3)


sleep(10)
touch((240,500))
sleep(6)
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
sleep(3)
swipe((600,400),(300,200))
sleep(3)
touch((245,287))
sleep(3)
touch(Template(r"tpl1653368543331.png", record_pos=(0.015, 0.114), resolution=(960, 540)))
sleep(10)
touch((875,451))

sleep(20)
wait(Template(r"tpl1652858513671.png", record_pos=(0.023, -0.212), resolution=(960, 540)),timeout=400)
sleep(6)
touch((500,460))
sleep(3)


sleep(3)
#2
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
sleep(3)
swipe((600,400),(300,200))
sleep(3)
touch(Template(r"tpl1653441289270.png", record_pos=(-0.055, 0.079), resolution=(960, 540)))

sleep(3)
touch(Template(r"tpl1653368543331.png", record_pos=(0.015, 0.114), resolution=(960, 540)))
sleep(10)
touch((875,451))

sleep(20)
wait(Template(r"tpl1652858513671.png", record_pos=(0.023, -0.212), resolution=(960, 540)),timeout=400)
sleep(6)
touch((500,460))
sleep(3)

sleep(3)
#3

swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
swipe((300,200),(600,400))
sleep(3)
swipe((600,400),(300,200))
sleep(3)
touch(Template(r"tpl1653441298231.png", record_pos=(0.143, 0.064), resolution=(960, 540)))

sleep(3)
touch(Template(r"tpl1653368543331.png", record_pos=(0.015, 0.114), resolution=(960, 540)))
sleep(10)
touch((875,451))

sleep(20)
wait(Template(r"tpl1652858513671.png", record_pos=(0.023, -0.212), resolution=(960, 540)),timeout=400)
sleep(6)
touch((500,460))
sleep(3)

touch((500,460))
sleep(3)

touch((500,460))
sleep(3)




sleep(3)
touch((900,50))
sleep(5)




#升级魂力
touch((864,508))
sleep(5)
touch((880,261))
sleep(2)




touch((920,180))
sleep(2)
touch((800,400))
sleep(5)
touch((570,272))
touch((570,300))
sleep(2)
touch(Template(r"tpl1652861254385.png", record_pos=(0.086, 0.084), resolution=(960, 540)))
sleep(5)
touch((520,400))
sleep(2)



touch((480,320))
sleep(2)
touch((800,400))
sleep(4)
touch((570,272))
touch((570,300))
sleep(2)
touch(Template(r"tpl1652861254385.png", record_pos=(0.086, 0.084), resolution=(960, 540)))
sleep(5)
touch((520,400))
sleep(2)


touch((480,320))
sleep(2)
touch((480,320))
sleep(2)
touch((800,400))
sleep(4)
touch((570,272))
touch((570,300))
sleep(2)
touch(Template(r"tpl1652861254385.png", record_pos=(0.086, 0.084), resolution=(960, 540)))
sleep(5)
touch((520,400))
sleep(2)





touch((930,40))
sleep(3)

sleep(6)


#魂师回忆
touch((674,508))
sleep(3)
touch((650,200))
sleep(3)

touch((920,180))
sleep(3)
touch((766,440))
sleep(3)
touch((561,278))
sleep(3)
touch((479,352))
sleep(3)
touch((477,375))
sleep(3)









touch((442,340))
sleep(3)
touch((766,440))
sleep(3)
touch((479,352))
sleep(3)
touch((477,375))
sleep(3)








touch((930,40))
sleep(6)

















#观战

touch((324,173))
touch((352,173))

sleep(8)
touch((407,236))
sleep(15)

touch((49,28))
sleep(3)
touch((567,351))
sleep(3)

touch((930,40))
sleep(3)





sleep(3)
#宗门
touch((920,510))
sleep(3)
touch((546,510))
sleep(3)

touch((100,190))
sleep(3)
touch((100,240))
sleep(3)
touch((810,115))
sleep(3)
touch((840,67))
sleep(3)

touch((100,235))
sleep(3)
touch((100,288))
sleep(3)
touch((810,115))
sleep(3)
touch((840,67))
sleep(3)

touch((100,275))
sleep(3)
touch((100,324))
sleep(3)
touch((810,115))
sleep(3)
touch((840,67))
sleep(3)

touch((100,316))
sleep(3)
touch((100,366))
sleep(3)
touch((810,115))
sleep(3)
touch((840,67))
sleep(3)




touch((900,180))
sleep(3)
touch((352,154))
sleep(3)
touch((506,432))
sleep(3)
touch((858,67))
sleep(3)



touch((852,318))
sleep(3)
touch((603,143))
sleep(3)
touch((603,143))
sleep(3)
touch((603,143))
sleep(3)
touch((676,451))
sleep(3)
touch((393,468))
sleep(3)
touch((569,465))
sleep(3)
touch((693,228))
sleep(3)
touch((693,228))
sleep(3)
touch((693,228))
sleep(3)
touch((676,451))
sleep(3)
touch((393,468))
sleep(3)
touch((569,465))
sleep(3)

touch((491,125))
sleep(3)

touch((450,3))
sleep(3)

touch((900,50))
sleep(3)












#福利
sleep(3)
touch((627,55))
sleep(3)
touch((830,180))
sleep(3)
touch((160,410))
sleep(3)
touch((160,410))
sleep(3)




touch((930,50))
sleep(3)

#每日礼包
sleep(3)
touch((803,55))
sleep(3)
touch((336,482))
sleep(3)
touch((288,174))
sleep(3)
touch((450,5))
sleep(3)
touch((470,480))
sleep(3)
touch((288,174))
sleep(3)
touch((450,5))
sleep(3)


touch((930,50))
sleep(3)

#领取奖励
touch((744,54))
sleep(3)
touch((295,140))
sleep(3)

touch((860,290))
sleep(3)
touch((860,290))
sleep(3)
touch((860,290))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((192,208))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((195,238))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((195,264))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((195,294))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((195,323))
sleep(3)
touch((771,133),times=10,duration=0.7)

touch((450,7))
sleep(3)

touch((860,130))
sleep(3)

touch((780,150),times=60,duration=0.7)
sleep(3)
















